﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Migrator.Entities;
using Migrator.Util;

namespace MigratorUI.UI
{
    public partial class SendPacketForm : Form
    {
        public SendPacketForm(IEnumerable<Node> nodes )
        {
            InitializeComponent();
            this.nodes = nodes;
            InitForm();
        }

        private void InitForm(){
            
            foreach (Node node in nodes)
            {
                this.cmbDestionations.Items.Add(node.IPAddress);
            }
        }

        private void OnOkClick(object sender, EventArgs e)
        {
           this.selectedIP = (IPAddress)this.cmbDestionations.SelectedItem;
        }

        IEnumerable<Node> nodes;
        public IPAddress selectedIP;
    }
}
